<?php namespace Summer\Shop\Updates;

use Schema;
use Winter\Storm\Database\Updates\Migration;

class BuilderTableCreateSummerShopOrderItmes extends Migration
{
    public function up()
    {
        Schema::create('summer_shop_order_itmes', function($table)
        {
            $table->engine = 'InnoDB';
            $table->increments('id')->unsigned();
            $table->timestamp('created_at')->nullable();
            $table->timestamp('updated_at')->nullable();
            $table->string('name');
            $table->integer('product_id');
            $table->integer('order_id');
            $table->string('index')->nullable();
            $table->string('description')->nullable();
            $table->string('title')->nullable();
            $table->decimal('price', 14, 2)->nullable();
            $table->integer('quantity')->nullable();
            $table->decimal('total', 14, 2)->nullable();
            $table->string('thumb')->nullable();
            $table->integer('user_id')->nullable();
            $table->string('status_slug')->nullable();

        });
    }
    
    public function down()
    {
        Schema::dropIfExists('summer_shop_order_itmes');
    }
}
